/**
 * Copyright(c) 2013 Jade Techonologies Co., Ltd.
 *
 * History:
 *   14-7-28 下午12:01 Created by dwzhang
 */
package com.jade.framework.base.comm;

/**
 * 连接过滤器。
 *
 * @author dwzhang
 * @version 1.0 14-7-28 下午12:01
 */
public interface ConnectionFilter
{
    /**
     * check if accept the connection
     *
     * @param session 连接Session.
     * @return true if accept the connection
     */
    boolean accept(ProtocolSession session);

    /**
     * notify when disconnect
     *
     * @param session 连接断开
     */
    void disconnected(ProtocolSession session);

}
